import { get } from '@/utils/http'
import config from '@/config/api'
import store from '@/store'

// 获取电影列表数据
export const getNowPlayingFilmList = (page = 1) => {
  let url = config.getNowPlayingFilmList.replace('%cityid', store.state.city.id)
  // console.log(url)
  return get(url + page)
}

// 即将上映
export const getComingSoonFilmList = (page = 1) => get(config.getComingSoonFilmList + page)

// 电影详情
export const getFilmInfo = id => get(config.getFilmInfo + id)
